package org.devops

//workflow-service
def esign_workflow_web(){
    tmp = '''server {
        #access_log  logs/access.log  main;
        listen 80;
        server_name _;
        location / {
            root html;
            index index.html;
        }
        location /platform-system-service/ {
            proxy_pass        http://172.16.1.122:32091/platform-system-service/;
        }
        location /workflow-service/ {
            proxy_pass        http://172.16.1.122:32091/workflow-service/;
        }
        proxy_set_header   Host    $host;
        proxy_set_header   X-Real-IP   $remote_addr;
        proxy_set_header   X-Forwarded-For $proxy_add_x_forwarded_for;
        client_max_body_size    1000m;

        error_page 500 502 503 504 /50x.html;

        location = /50x.html {
            root html;
        }
    }'''
    return tmp.trim()
}

//esign-auth-web
def esign_auth_web(){
    tmp = '''
    server {
        listen 80;
        server_name _;
        location / {
            root html;
            index index.html;
        }
        location /auth-service/ {
            proxy_pass        http://172.16.1.122:32091/auth-service/;
        }
        location /platform-system-service/ {
            proxy_pass        http://172.16.1.122:32091/platform-system-service/;
        }
        proxy_set_header   Host    $host;
        proxy_set_header   X-Real-IP   $remote_addr;
        proxy_set_header   X-Forwarded-For $proxy_add_x_forwarded_for;
        client_max_body_size    1000m;

        error_page 500 502 503 504 /50x.html;

        location = /50x.html {
            root html;
        }
        
}
'''
    return tmp.trim()
}
